//建行支付
var strMD5;
var URL;
var URL0;//网上银行支付
var URL1;//E付卡支付

function make()
{
	var tmp;
	var tmp0;
	var tmp1;
	var temp_New;
    var temp_New1;
    
    var MERCHANTID=document.getElementById("MERCHANTID").value;//商户代码
	var POSID=document.getElementById("POSID").value;//商户柜台代码
	var BRANCHID=document.getElementById("BRANCHID").value;//分行代码
	var ORDERID=document.getElementById("ORDERID").value;//定单号
	var PAYMENT=document.getElementById("PAYMENT").value;//付款金额
	var CURCODE=document.getElementById("CURCODE").value;//币种
	var TXCODE=document.getElementById("TXCODE").value;//交易码
	var REMARK1=document.getElementById("REMARK1").value;//备注1
	var REMARK2=document.getElementById("REMARK2").value;//备注2
	
	var bankURL='https://ibsbjstar.ccb.com.cn/app/ccbMain';
	
	tmp ='MERCHANTID='+MERCHANTID+'&POSID='+POSID+'&BRANCHID='+BRANCHID+'&ORDERID='+ORDERID+'&PAYMENT='+PAYMENT+'&CURCODE='+CURCODE+'&TXCODE='+TXCODE+'&REMARK1='+REMARK1+'&REMARK2='+REMARK2;
	tmp0='MERCHANTID='+MERCHANTID+'&POSID='+POSID+'&BRANCHID='+BRANCHID+'&ORDERID='+ORDERID+'&PAYMENT='+PAYMENT+'&CURCODE='+CURCODE+'&TXCODE=520100'+'&REMARK1='+REMARK1+'&REMARK2='+REMARK2;
	
	var REGINFO = escape(document.getElementById("REGINFO").value); //注册信息中文编码
	var PROINFO = escape(document.getElementById("PROINFO").value); //商品信息中文编码
	
	var PUB32TR2 = document.getElementById("PUB32TR2").value;//公钥后30位
	var GATEWAY = document.getElementById("GATEWAY").value;//网关类型
	var CLIENTIP = document.getElementById("CLIENTIP").value;//客户端ip
	var REFERER = document.getElementById("MER_REFERER").value;//商户域名
	
	temp_New=tmp+'&TYPE=1&PUB='+PUB32TR2+'&GATEWAY='+GATEWAY+'&CLIENTIP='+CLIENTIP+'&REGINFO='+REGINFO+'&PROINFO='+PROINFO+'&REFERER='+REFERER;
	temp_New1=tmp+'&TYPE=1&GATEWAY='+GATEWAY+'&CLIENTIP='+CLIENTIP+'&REGINFO='+REGINFO+'&PROINFO='+PROINFO+'&REFERER='+REFERER;

	strMD5=hex_md5(temp_New);

    URL = bankURL+'?'+tmp+'&MAC='+strMD5;
	URL0 = bankURL+'?'+tmp0+'&MAC='+hex_md5(tmp0);
	
	URL3 = bankURL+'?'+temp_New1+'&MAC='+hex_md5(temp_New);
	
	document.getElementById("MAC").value=strMD5;
	document.getElementById("URL01").value=URL0+'||'+URL1;
	document.getElementById("result").value=URL3;

    return true;
}
function go( sendUrl)
{
	var objMD5form=document.getElementById("MD5form");
	objMD5form.method="post";
	objMD5form.action=sendUrl;
	objMD5form.submit();
}